#include <ObjectInspectorDirector.h>
#include <iostream>

ObjectInspectorDirector::ObjectInspectorDirector( QObject *parent /*= 0*/ ):QObject(parent)
{

}

ObjectInspectorDirector::~ObjectInspectorDirector()
{

}

void ObjectInspectorDirector::clear()
{

}

void ObjectInspectorDirector::rebuild(QStandardItem *model_root_item)
{

}

void ObjectInspectorDirector::currentItemChanged(ObjectInspectorItem *item_ptr)
{

}

void ObjectInspectorDirector::selectionItemChanged(QList<ObjectInspectorItem *> item_list)
{

}

//void ObjectInspectorDirector::addItemDown(ObjectInspectorItem *parent_item, QString object_type_name)
//{

//}

bool ObjectInspectorDirector::addItemDown(EObject *parentObj, EObject *newObj)
{
    return false;
}

//void ObjectInspectorDirector::deleteItem(QList<ObjectInspectorItem *> item_list)
//{

//}

//void ObjectInspectorDirector::deleteItem(ObjectInspectorItem *item_ptr)
//{

//}

bool ObjectInspectorDirector::deleteItem(EObject *obj)
{
    return false;
}

//void ObjectInspectorDirector::changeItemParent(QList<ObjectInspectorItem *> item_list)
//{

//}

bool ObjectInspectorDirector::changeItemParent(EObject *parentObj, EObject *childObj)
{
    return false;
}

//void ObjectInspectorDirector::copyItem(QList<ObjectInspectorItem *> item_list)
//{
    
//}

//void ObjectInspectorDirector::copyItem(ObjectInspectorItem *item_list)
//{
    
//}

bool ObjectInspectorDirector::copyItem(EObject *objPtr)
{
    return false;
}

void ObjectInspectorDirector::expandItem(QList<ObjectInspectorItem *> item_list)
{

}

void ObjectInspectorDirector::expandItem(ObjectInspectorItem *item)
{

}

void ObjectInspectorDirector::contractItem(QList<ObjectInspectorItem *> item_list)
{
    for(int i = 0; i < item_list.size(); i++)
    {
        contractItem(item_list[i]);
        break;//only expand the first one in the list
    }
}

void ObjectInspectorDirector::contractItem(ObjectInspectorItem *item)
{
    item->removeRows(0, item->rowCount());
    item->setHasExpanded(false);
}

void ObjectInspectorDirector::refresh()
{

}

QList<QAction *> ObjectInspectorDirector::getActionList()
{
    QList<QAction*> actionList;
    return actionList;
}

